/**
 * 
 */
package com.honghao.student.service.impl;

import java.util.List;



import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.honghao.student.dao.StudentDao;
import com.honghao.student.pojo.Student;
import com.honghao.student.service.IStudentService;


/**
 * @author honghao.li
 *
 */
@Service
@Qualifier("StudentServiceMongoDBImpl")
public class StudentServiceMongoDBImpl implements IStudentService {
    
    private static final Logger LOGGER = LoggerFactory
            .getLogger(StudentServiceMongoDBImpl.class);
    
    @Autowired @Qualifier("StudentDaoMongoImpl")
    private StudentDao studentDao;
    
    /* (non-Javadoc)
     * @see com.honghao.student.service.IStudentService#getAllStudent()
     */
    @Override
    public List<Student> getAllStudent() {
        LOGGER.info("get mongo info");
        return studentDao.selectAll();
    }

    /* (non-Javadoc)
     * @see com.honghao.student.service.IStudentService#updateStudent(com.honghao.student.pojo.Student)
     */
    @Override
    public void updateStudent(Student student) {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see com.honghao.student.service.IStudentService#register(com.honghao.student.pojo.Student)
     */
    @Override
    public void register(Student student) {
        studentDao.save(student);
    }

    /* (non-Javadoc)
     * @see com.honghao.student.service.IStudentService#delete(int)
     */
    @Override
    public void delete(int stuId) {
        // TODO Auto-generated method stub

    }

}
